<div class="container-fluid" style="margin-top: 10px;">

    <div class="row">
        <form id="condition-form" class="mt10" method="post" action="addSession" enctype="multipart/form-data">
            <div class="col-xs-12" >
                {:Form('text',['title'=>'资产编号','name'=>'BUILDING_NO','value'=>$Think.session.list_condition_con_building.BUILDING_NO,'col'=>'col-xs-12'])}
                {:Form('text',['title'=>'资产名称','name'=>'BUILDING_NAME','value'=>$Think.session.list_condition_con_building.BUILDING_NAME,'col'=>'col-xs-12'])}
                {:Form('select2',['title'=>'所属在建工程','name'=>'CONS_ID','value'=>$Think.session.list_condition_con_building.CONS_ID,'url'=>'dict/getConstruction','key'=>'CONS_ID','field'=>'CONS_BELONG','col'=>'col-xs-12'])}
                {:Form('select2',['title'=>'资产分类','name'=>'ASSET_TYPE_ID','value'=>$Think.session.list_condition_con_building.ASSET_TYPE_ID,'url'=>'dict/getBuildingAssetType','key'=>'CCODE94','field'=>'CNAME94','col'=>'col-xs-12'])}
                {:Form('select2',['title'=>'产权形式','name'=>'PROPERTYRIGHT_ID','value'=>$Think.session.list_condition_con_building.PROPERTYRIGHT_ID,'url'=>'dict/getPropertyRight','key'=>'PROPERTYRIGHT_ID','field'=>'PROPERTYRIGHT','col'=>'col-xs-12'])}
                {:Form('select2',['title'=>'权属性质','name'=>'POWERTYPE_ID','value'=>$Think.session.list_condition_con_building.POWERTYPE_ID,'url'=>'dict/getPowerType','key'=>'POWERTYPE_ID','field'=>'POWERTYPE','col'=>'col-xs-12'])}
                {:Form('select2',['title'=>'取得方式','name'=>'GETTYPE_ID','value'=>$Think.session.list_condition_con_building.GETTYPE_ID,'url'=>'dict/getGetType','key'=>'GETTYPE_ID','field'=>'GETTYPE','col'=>'col-xs-12'])}
                {:Form('select2',['title'=>'建筑结构','name'=>'CONSTRU_ID','value'=>$Think.session.list_condition_con_building.CONSTRU_ID,'url'=>'dict/getConstru','key'=>'CONSTRU_ID','field'=>'CONSTRU','col'=>'col-xs-12'])}
                {:Form('select2',['title'=>'入账形式','name'=>'ENTER_TYPE_ID','value'=>$Think.session.list_condition_con_building.ENTER_TYPE_ID,'url'=>'dict/getEnterType','key'=>'ENTER_TYPE_ID','field'=>'ENTER_TYPE','col'=>'col-xs-12'])}
                {:Form('select2',['title'=>'使用方向','name'=>'USEDIRECTION_ID','value'=>$Think.session.list_condition_con_building.USEDIRECTION_ID,'url'=>'dict/getUseDirection','key'=>'USEDIRECTION_ID','field'=>'USEDIRECTION','col'=>'col-xs-12'])}
                {:Form('select2',['title'=>'使用状态','name'=>'STATUS_ID','value'=>$Think.session.list_condition_con_building.STATUS_ID,'url'=>'dict/getAssetStatus','key'=>'STATUS_ID','field'=>'STATUS','col'=>'col-xs-12'])}
                {:Form('select2',['title'=>'管理部门','name'=>'COLLEGE_ID','value'=>$Think.session.list_condition_con_building.COLLEGE_ID,'url'=>'dict/getCollege','key'=>'COLLEGE_ID','field'=>'SHORTNAME','col'=>'col-xs-12'])}
                {:Form('select2',['title'=>'价值类型','name'=>'VALUETYPE_ID','value'=>$Think.session.list_condition_con_building.VALUETYPE_ID,'url'=>'dict/getValueType','key'=>'VALUETYPE_ID','field'=>'VALUETYPE','col'=>'col-xs-12'])}
                {:Form('select2',['title'=>'折旧状态','name'=>'DEPRECIATE_STATUS_ID','value'=>$Think.session.list_condition_con_building.DEPRECIATE_STATUS_ID,'url'=>'dict/getDepreciate','key'=>'DEPRECIATE_ID','field'=>'DEPRECIATE','col'=>'col-xs-12'])}
                <div class="col-xs-12" style="padding-top:4px;padding-bottom: 4px;">
                    <div class="input-group" style="width: 100%;">
                            <span class="input-group-addon" style="width: 100px;text-align: right">
                                取得日期 从
                            </span>
                        <input name="GET_DATE_START"  value="{$Think.session.list_condition_con_building.GET_DATE_START}"  type="text" class="form-control">
                        <span class="input-group-addon">
                                到
                            </span>
                        <input name="GET_DATE_END"  value="{$Think.session.list_condition_con_building.GET_DATE_END}"  type="text" class="form-control">

                    </div>
                </div>

                <div class="col-xs-12" style="padding-top:4px;padding-bottom: 4px;">
                    <div class="input-group" style="width: 100%;">
                            <span class="input-group-addon" style="width: 100px;text-align: right">
                                价值 从
                            </span>
                        <input name="BUILDING_FEE_START"  value="{$Think.session.list_condition_con_building.BUILDING_FEE_START}"  type="text" class="form-control">
                        <span class="input-group-addon">
                                到
                            </span>
                        <input name="BUILDING_FEE_END"  value="{$Think.session.list_condition_con_building.BUILDING_FEE_END}"  type="text" class="form-control">

                    </div>
                </div>

                <div class="col-xs-12" style="padding-top:4px;padding-bottom: 4px;">
                    <div class="input-group" style="width: 100%;">
                            <span class="input-group-addon" style="width: 100px;text-align: right">
                                建筑面积 从
                            </span>
                        <input name="BUILD_SIZE_START"  value="{$Think.session.list_condition_con_building.BUILD_SIZE_START}"  type="text" class="form-control">
                        <span class="input-group-addon">
                                到
                            </span>
                        <input name="BUILD_SIZE_END"  value="{$Think.session.list_condition_con_building.BUILD_SIZE_END}"  type="text" class="form-control">

                    </div>
                </div>
            </div>
            <div class="col-xs-12" style="margin-top: 30px;text-align: center">
                <button onclick="search()" type="button" class="btn btn-info">查询</button>
                <button type="reset" class="btn btn-default" >重置</button>
                <button type="button" onclick="resetAll()" class="btn btn-danger" >清空</button>
            </div>
        </form>
    </div>
</div>

<script>

    $(function() {
        $("[name='GET_DATE_START']").flatpickr();
        $("[name='GET_DATE_END']").flatpickr();
    });
    function search() {
        $("#condition-form").ajaxSubmit(function (res) {
            console.log(res)
            var json = JSON.parse(res);
            if (json['code']=='200') {
                var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
                parent.layer.close(index); //再执行关闭
                parent.refreshTable();
            }
        })
    }
    function resetAll() {
        $(':input','#condition-form')
            .not(':button, :submit, :reset, :hidden')
            .val('')
            .removeAttr('checked')
            .removeAttr('selected');
    }

</script>